/**   
* @Title: AttachmentService.java
* @Package com.jootu.cc.ccapi.service
* @Description: TODO(用一句话描述该文件做什么)
* @author antch,861710865@qq.com   
* @date 2017年8月13日 下午5:23:01
* @version V1.0   
*/


package com.jootu.cc.ccapi.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.jootu.cc.ccapi.domain.Attachment;
import com.jootu.cc.ccapi.domain.AttachmentMapper;

/**
* @ClassName: AttachmentService
* @Description: TODO(分页插件测试)
* @author antch,861710865@qq.com
* @date 2017年8月13日 下午5:23:01
* 
*/
@Service
public class AttachmentService {

	@Autowired
	AttachmentMapper attachmentMapper;
	
	public List<Attachment> getAttachmentsByPage(int pageNum,int pageSize){
		System.out.println("分页查询开始");
		PageHelper.startPage(pageNum, pageSize);

		List<Attachment> lists = attachmentMapper.selectAll();
		System.out.println("分页查询结束");
		return lists;
	}
}
